<!DOCTYPE html>
<html lang="zh-Hans-cn">

<head>
    <meta charset="UTF-8">
</head>

<body>
    <script>
        class Animal {
            constructor(name, weight, color) {
                this.name = name;
                this.weight = weight + 'kg';
                this.color = color;
            }
            呼吸() {

            }
        }

        class Cat extends Animal {
            捕老鼠() {
                console.log(`我是${tbis.name}，我正在捕老鼠`)
            }
        }
        class Fish extends Animal {
            swim() {
                console.log(`我是${this.name}，我正海里游泳`)
            }
        }
    </script>
</body>

</html>